
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="imports.jsp"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" media="screen" type="text/css" title="style"
	href="style.css" />
<title>Inscription</title>
</head>
<body>

	<c:if test="${sessionUser != null}">
		<jsp:forward page="/m" />
	</c:if>
	<div id="wrapper">
		<div id="header">
			<div id="logo">
				<h1>e-commerce de livres</h1>


			</div>

		</div>
		<!-- end #header -->
		<div id="menu">
			<jsp:include page="header.jsp" />
		</div>
		<!-- end #menu -->
		<div id="page">
			<div id="page-bgtop">
				<div id="page-bgbtm">


					<div id="content">

						<div class="post">
							<h2 class="title">Création de votre compte</h2>
							<div class="entry">


								<c:if test="${fn:length(registrationMessage) == 0}">
									<p>
										Veuillez faire un choix de nom d'utilisateur et de mot de
										passe, ainsi qu'introduire vos coordonnées (tous les champs
										sont obligatoires). <br />
										<br />
									</p>
								</c:if>
								<c:if test="${fn:length(registrationMessage) == 1}">
									<p>L'enregistrement n'a pas pu se faire pour la raison
										suivante :</p>
									<p>${registrationMessage[0]}</p>
								</c:if>
								<c:if test="${fn:length(registrationMessage) > 1}">
									<p>L'enregistrement n'a pas pu se faire pour les raisons
										suivantes :</p>
									<ol>
										<c:forEach var="text" items="${registrationMessage}">
											<li>${text}</li>
										</c:forEach>
									</ol>
								</c:if>
								<p></p>

								<form method="post" action="Registration">
									<fieldset>
										<legend>Identification du compte</legend>
										<table>
											<tr>
												<td><label for="username">Nom d'utilisateur : </label>
												</td>
												<td><input type="text" name="username" id="username"
													size="30" maxlength="40"
													value="${userRegistration.username}" /></td>
											</tr>
											<tr>
												<td><label for="password">Mot de passe : </label></td>
												<td><input type="password" name="password"
													id="password" size="30" maxlength="40"
													value="${userRegistration.password}" /></td>
											</tr>
											
											
										</table>
										<input type="hidden" name="role" value="client">
									</fieldset>
									<br />

									<fieldset>
										<legend>Vos coordonnées</legend>
										<table>
											<tr>
												<td><label for="lastname">Nom : </label></td>
												<td><input type="text" name="lastname" id="lastname"
													size="30" maxlength="40"
													value="${userRegistration.lastname}" /></td>
											</tr>
											<tr>
												<td><label for="firstname">Prénom : </label></td>
												<td><input type="text" name="firstname" id="firstname"
													size="30" maxlength="40"
													value="${userRegistration.firstname}" /></td>
											<tr>
											<tr>
												<td><label for="email">E-mail : </label></td>
												<td><input type="text" name="email" id="email"
													size="30" maxlength="200" value="${userRegistration.email}" />
												</td>
											<tr>
											<tr>
												<td><label for="address">Adresse : </label></td>
												<td><input type="text" name="address" id="address"
													size="30" maxlength="200"
													value="${userRegistration.address}" /></td>
											<tr>
											<tr>
												<td><label for="city">Ville : </label></td>
												<td><input type="text" name="city" id="city" size="30"
													maxlength="40" value="${userRegistration.city}" /></td>
											<tr>
											<tr>
												<td><label for="postcode">Code postal : </label></td>
												<td><input type="text" name="postcode" id="postcode"
													size="8" maxlength="8"
													<c:if test="${userRegistration.postcode != 0}">
								value="${userRegistration.postcode}"
							</c:if> />
												</td>
											<tr>
										</table>
									</fieldset>

									<input type="submit" value="Envoyer" />
								</form>


							</div>


						</div>

						<div style="clear: both;">&nbsp;</div>
					</div>
					<!-- end #content -->
					<div id="sidebar">
						<ul>
							<jsp:include page="admin.jsp" />
							<jsp:include page="categories.jsp" />



						</ul>
					</div>
					<!-- end #sidebar -->
					<div style="clear: both;">&nbsp;</div>
				</div>
			</div>
		</div>
		<!-- end #page -->
	</div>
	<div id="footer">
		<p>Copyright (c) 2011. All rights reserved.</p>
	</div>
	<!-- end #footer -->
</body>
</html>



